﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NationalD3.Domain.Validations.Students;

namespace NationalD3.Domain.Commands.Students
{
    /// <summary>
    /// 删除学生命令模型类
    /// </summary>
    public class DeleteStudentCommand : StudentCommand
    {
        /// <summary>
        /// 构造方法
        /// </summary>
        public DeleteStudentCommand(Guid id)
        {
            this.Id = id;
        }

        /// <summary>
        /// 实现基类抽象方法, 验证模型是否有效
        /// </summary>
        /// <returns></returns>
        public override bool IsValid()
        {
            ValidationResult = new DeleteStudentCommandValidation().Validate(this);
            return ValidationResult.IsValid;
        }
    }
}
